package com.lanzuo.yxd.scanner.controller;

import com.lanzuo.yxd.scanner.scanner.ScannerClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/test")
public class MessageController {

    @PostMapping("/send-t1")
    public String sendT1() {
        // 先扫上面的码
        ScannerClient bottomClient = new ScannerClient(1, "127.0.0.1", "bottom");
        bottomClient.sendT1();
        return "T1 已发送（若已连接）";
    }


}